package com.wxq.workpad.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter

class MainFragmentAdapter(fm: FragmentManager, fragments:MutableList<Fragment>) : FragmentPagerAdapter(fm) {

    private var mFragments:MutableList<Fragment>

    init {
        mFragments=fragments

    }


    override fun getCount(): Int {
        return mFragments.size
    }

    override fun getItem(position: Int): Fragment {
        return mFragments.get(position)
    }
}